<!doctype html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no"/>
<meta charset="utf-8"/>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
</head>
<body>
<form action="">
<input id="id" value="1"/>
<input id="test" type="button" value="test"/>
</form>
<div id="result"></div>
</body>
<script type="text/javascript">
$(document).ready(function(){
	$("#test").click(function(){
		var id = $("#id").val();
		console.log(id);
		$.ajax({url:"sj/tTest/1", dataType:"json", method:"POST",
			success:function(data, status, xhr){
				$("#result").html(data.rset[0].name);
			},
			error:function(xhr, status, e){
				$("#result").html("error " + xhr.responseText);
			}
		});
	});
});
</script>
</html>